/*
 * @Description: 产量查询
 */
import zhreq from "@/api/axios";
export default {
  /**
   * @description: 获取所有批次 *代表必填
   */
  getbatchlist(params) {
    return zhreq.post("/v3/batch/productionBatch/queryByCondition", {
      ...params
    });
  },
  /**
  * @description: 获取所有批次 *代表必填
  */

  gettablelist(params) {
    params.entity.organizationNo = sessionStorage.organizationNo;
    return zhreq.post("/v3/batch/productionBatch/queryPageByCondition", params);
  },
  /**
   * @description: 获取批次总产量 *代表必填
   */
  getzonchanlianglist(batchNo) {
    return zhreq.get(`/batch/queryTotalYield/${batchNo}`);
  },
  /**
   * @description: 获取批次下各地块 *代表必填
   */
  getgedikuailist(batchNo) {
    return zhreq.get(`/batch/queryFacilityYield/${batchNo}`);
  },
  /**
   * @description: 获取批次下亩产量 *代表必填
   */
  getmuchanlianglist(batchNo) {
    return zhreq.get(`/batch/queryMuYield/${batchNo}`);
  },
  /**
   * @description: 获取种养品种 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   */
  getlist(params) {
    return zhreq.post("/partYield/queryPageList", {
      page: params.page,
      size: params.size,
      entity: {
        "batchNo": params.batchNo
      }
    });
  },
  /**
 * @description: 获取产量 *代表必填
 */
  getTotalYieldList(params) {
    return zhreq.get(`v3/harvest/totalYield/findByBatchNo?no=${params}`);
  },
  /**
* @description: 获取产量表格 *代表必填
*/
  getYieldList(params) {
    return zhreq.post(`v3/harvest/yield/queryByCondition`, params);
  },
  /**
   * @description:模糊查询种养品种表格列表 *代表必填
   */
  getqueryList(params) {
    return zhreq.post("/plantVariety/queryByCondition", {
      auditFlag: 1,
      varietyNameLike: params
    });
  },
  /**
   * @description: 批量添加种养品种
   * @param {Object}  *
   */
  addlist(params) {
    return zhreq.post('/plantVariety/add', params);
  },
  /**
   * @description: 批量删除种养品种
   * @param {Object}  *
   */
  dellist(params) {
    return zhreq.post('/plantVariety/delList', {
      'plantVarietyIdList': params
    });
  },
  /**
   * @description: 修改种养品种
   * @param {Object}  *
   */
  editlist(params) {
    return zhreq.post('/plantVariety/edit', params);
  },
  /**
   * @description: 通过种养类别查种养品种
   * @param {Object}  *
   */
  querybycondition(params) {
    return zhreq.post('/plantVariety/queryByCondition', {
      ...params
    });
  }
};
